const mongoose=require('mongoose');

function dbConnect(){
    mongoose.connect('mongodb://localhost:27017/shoponline');
    mongoose.connection.once('open',function(err){
        if(err){
            console.log('Mongodb is not opening');
        }else {
            console.log('Mongodb is opening');
        }
    });
}
exports.dbConnect=dbConnect;